import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/dashboard',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/classifiedinformation/Community.vue'),
                    meta: { title: '居民分类信息',
                    icon: 'el-icon-lx-home',
                    requireAuth: true
                 }
                },{
                    path: '/company',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/classifiedinformation/Company.vue'),
                    meta: { title: '单位分类信息',
                    icon: 'el-icon-lx-home',
                    requireAuth: true
                 }
                },{
                    path: '/realtimestatus',
                    component: () =>import('../components/page/realtimestatus.vue'),
                    meta: { title: '实时投放',
                    icon: 'el-icon-chat-line-square'
                    }
                },
                {
                    path: '/datastatistics',
                    component: () =>import('../components/page/datastatistics.vue'),
                    meta: { title: '大数据统计',
                    icon: 'el-icon-s-data'
                    }
                },
                {
                    path: '/guide',
                    component: ()=>import('../components/page/guide.vue'),
                    meta: {title: '指导员',icon: 'el-icon-s-data'}
                },
                {
                    path: '/integralmanagement',
                    component: () =>import('../components/page/integralmanagement.vue'),
                    meta: {
                        title: '积分管理',
                        icon: 'el-icon-coin'
                    }
                },
                {
                    path: '/cumulativeintegralmanagement',
                    component: ()=>import('../components/page/cumulativeintegralmanagement.vue'),
                    meta: {title: '累计投放积分规则设置',icon: 'el-icon-coin'}
                },
                {
                    path: '/consumptionrules',
                    component: ()=>import('../components/page/consumptionrules.vue'),
                    meta: {title: '消费积分规则设置',icon: 'el-icon-coin'}
                },
                // {
                //     path: '/street',
                //     component: ()=>import('../components/page/street.vue'),
                //     meta: {title: '街道',icon: 'el-icon-coin'},
                // },
                {
                    path: '/streetintegral',
                    component: ()=>import('../components/page/streetintegral/streetintegral.vue'),
                    meta: {title: '街道累计积分',icon : 'el-icon-coin'}
                },
                {
                    path: '/streetscore',
                    component: ()=>import('../components/page/streetintegral/streetscore.vue'),
                    meta: {title: '街道消费积分',icon : 'el-icon-coin'}
                },
                {
                    path: '/streetremaining',
                    component: ()=>import('../components/page/streetintegral/streetremaining.vue'),
                    meta: {title: '街道剩余积分',icon : 'el-icon-coin'}
                },
                // {
                //     path: '/community',
                //     component: ()=>import('../components/page/community.vue'),
                //     meta: {title: '社会',icon: 'el-icon-coin'}
                // },
                {
                    path: '/communityintegral',
                    component: ()=>import('../components/page/communityintegral/communityintegral.vue'),
                    meta: {title: '社区累计积分',icon: 'el-icon-coin'}
                },
                {
                    path: '/communityscore',
                    component: ()=>import('../components/page/communityintegral/communityscore.vue'),
                    meta: {title: '社区消费积分',icon: 'el-icon-coin'}
                },
                {
                    path: '/communityremaining',
                    component: ()=>import('../components/page/communityintegral/communityremaining.vue'),
                    meta: {title: '社区剩余积分',icon: 'el-icon-coin'}
                },
                {
                    path: '/plotintegral',
                    component: ()=>import('../components/page/plotintegral/plotintegral.vue'),
                    meta: {title: '小区累计积分',icon: 'el-icon-coin'}  
                },
                {
                    path: '/plotscore',
                    component: ()=>import('../components/page/plotintegral/plotscore.vue'),
                    meta: {title: '小区消费积分',icon: 'el-icon-coin'}  
                },
                {
                    path: '/plotremaining',
                    component: ()=>import('../components/page/plotintegral/plotremaining.vue'),
                    meta: {title: '小区剩余积分',icon: 'el-icon-coin'}  
                },
                {
                    path: '/residentsintegral',
                    component: ()=>import('../components/page/residentsintegral/residentsintegral.vue'),
                    meta: {title: '居民累计积分',icon: 'el-icon-coin'}
                },
                {
                    path: '/residentsscore',
                    component: ()=>import('../components/page/residentsintegral/residentsscore.vue'),
                    meta: {title: '居民消费积分',icon: 'el-icon-coin'}
                },
                {
                    path: '/residentsremaining',
                    component: ()=>import('../components/page/residentsintegral/residentsremaining.vue'),
                    meta: {title: '居民剩余积分',icon: 'el-icon-coin'}
                },
                {
                    path: '/icon',
                    component: () => import(/* webpackChunkName: "icon" */ '../components/page/Icon.vue'),
                    meta: { title: '自定义图标' }
                },
                // {
                //     path: '/table',
                //     component: () => import(/* webpackChunkName: "table" */ '../components/page/BaseTable.vue'),
                //     meta: { title: '人员列表',
                //     icon: 'el-icon-lx-cascades'}
                // },
                {
                    path: '/tabs',
                    component: () => import(/* webpackChunkName: "tabs" */ '../components/page/Tabs.vue'),
                    meta: { title: '实时投放',
                    icon: 'el-icon-lx-copy'
                    }
                },
                {   
                    path: '/residentsmessage',
                    component: ()=>import('../components/page/residentsmessage.vue'),
                    meta: {title: '居民信息管理',icon: 'el-icon-lx-calendar'}
                },
                {
                    path: 'streetmessage',
                    component: ()=>import('../components/page/streetmessage'),
                    meta: {title: '街道信息管理',icon: 'el-icon-lx-calendar'}
                },
                {
                    path: '/communitymessage',
                    component: ()=>import('../components/page/communitymessage'),
                    meta: {title: '社区信息管理',icon: 'el-icon-lx-calendar'}
                },
                {
                    path: '/xiaoqumessage',
                    component: ()=>import('../components/page/xiaoqumessage'),
                    meta: {title: '小区信息管理',icon: 'el-icon-lx-calendar'}
                },
                {
                    path: '/businessunit',
                    component: ()=>import('../components/page/businessunit'),
                    meta: {title: '机关事业单位/餐饮单位',icon: 'el-icon-lx-calendar'}
                },
                {
                    path: '/instructor',
                    component: ()=>import('../components/page/instructor'),
                    meta: {title: '指导员信息管理',icon: 'el-icon-lx-calendar'}
                },
                {
                    path: '/inspector',
                    component: ()=>import('../components/page/inspector.vue'),
                    meta: {title: '巡查员信息管理',icon: 'el-icon-lx-calendar'}
                },
                {
                    path: '/lajidian',
                    component: ()=>import('../components/page/lajidian.vue'),
                    meta: {title: '垃圾点信息管理',icon: 'el-icon-lx-calendar'}
                },
                {
                    path: '/handlecard',
                    component: ()=>import('../components/page/handlecard.vue'),
                    meta: {title: '办卡管理',icon: 'el-icon-lx-calendar'}
                },
                {
                    path: '/streetweigh',
                    component: ()=>import('../components/page/streetweigh.vue'),
                    meta: {title: '街道统计',icon: 'el-icon-coin'}
                },
                {
                    path: '/communityweigh',
                    component: ()=>import('../components/page/communityweigh.vue'),
                    meta: {title: '社区统计',icon: 'el-icon-coin'}
                },
                {
                    path: '/plotweigh',
                    component: ()=>import('../components/page/plotweigh.vue'),
                    meta: {title: '小区统计',icon: 'el-icon-coin'}  
                },
                
                {
                    path: '/residentsweigh',
                    component: ()=>import('../components/page/residentsweigh.vue'),
                    meta: {title: '居民统计',icon: 'el-icon-coin'}
                },
                {
                    path: '/Institutionsweigh',
                    component: ()=>import('../components/page/Institutionsweigh.vue'),
                    meta: {title: '机关单位',icon: 'el-icon-coin'}
                },
                // {
                //     path: '/form',
                //     component: () => import(/* webpackChunkName: "form" */ '../components/page/BaseForm.vue'),
                //     meta: { title: '基本表单',
                //     icon: 'el-icon-lx-calendar'
                // }
                // },
                {
                    // 图片上传组件
                    path: '/upload',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/Upload.vue'),
                    meta: { title: '文件上传' }
                },
                {
                    // 权限页面
                    path: '/permission',
                    component: () => import(/* webpackChunkName: "permission" */ '../components/page/Permission.vue'),
                    meta: { title: '权限测试', permission: true }
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                },
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
